<template>
    <h3>自定义指令演示</h3>
    <p v-my-name="name">this is origin string</p>
</template>
<script setup>
import {ref} from "vue";
const name = ref("buobao");
const vMyName = {
    mounted(element,binding){
        element.innerHTML = element.innerHTML +"-*-" +binding.value;
        element.style.color = "red"; 
    }
    //这里除了mounted还有beforeMounted、updated、beforeUpdate、unmounted等等，都可以添加
}

</script>